<template>
    <div class="mui-content enterpriseHome mui-scroll-wrapper ">
        <div class="mui-scroll">
            <!--服务中心-->
            <ul class="mui-table-view mui-table-view-chevron mgb1 mgt1">
                <li class="mui-table-view-cell mui-media" v-if="profile.enterpriseName != null && profile.enterpriseName != ''">
                    <a class="userCenterInfo" href="javascript:;">
                        <div class="mui-media-body">
                            <p class="table-view-cell-title">{{profile.enterpriseName}}</p>
                            <p class='mui-ellipsis table-view-cell-text'>
                                <i class="mui-icon mui-icon-phone-filled text3"></i>
                                <span>{{profile.enterpriseTel}}</span>
                            </p>
                        </div>
                    </a>
                </li>
            </ul>
            <!--我的订单-->
            <ul class="mui-table-view mui-table-view-chevron mgb1">
                <li class="mui-table-view-cell" v-link="{name:'enterpriseOrder',params:{tab:'enterAll'}}">
                    <p class="mui-navigate-right table-view-cell-title">
                        <span>我的订单</span>
                        <a href="javascript:;" class="mui-pull-right color2 right-text">所有订单</a>
                    </p>
                </li>
                <li  class="mui-table-view-cell orderindex">
                    <div class="col-6 mui-text-center">
                        <a href="javascript:;" class="pendingBtn" v-link="{name:'enterpriseOrder',params:{tab:'enterNeedConfirm'}}">
                            <i class="mui-icon icon-shopping color6 text6-size ">
                                <span class="mui-badge" v-if="result.DQRCount != 0">{{result.DQRCount}}</span>
                            </i>
                            <p>
                                <span class="text2-size">待确认</span>
                            </p>
                        </a>
                    </div>
                    <div class="col-6 mui-text-center">
                        <a href="javascript:;" class="repairBtn" v-link="{name:'enterpriseOrder',params:{tab:'enterNeedRepair'}}">
                            <i class="mui-icon icon-daiweixiu color6 text6-size">
                                <span class="mui-badge" v-if="result.DWXCount != 0">{{result.DWXCount}}</span>
                            </i>
                            <p>
                                <span class="text2-size">待维修</span>
                            </p>
                        </a>
                    </div>
                </li>
            </ul>
            <!--收到的评价-->
            <ul class="mui-table-view mui-table-view-chevron mgb1" v-link="{name:'enterpriseComments'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">收到的评价</a>
                </li>
            </ul>
            <!--意见反馈-->
            <ul class="mui-table-view mui-table-view-chevron mgb1" v-link="{name:'feedbackInput'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">意见反馈</a>
                </li>
            </ul>
            <!--关于我们-->
            <ul class="mui-table-view mui-table-view-chevron mgb1" v-link="{name:'aboutus'}">
                <li class="mui-table-view-cell">
                    <a href="javascript:;" class="mui-navigate-right table-view-cell-title">关于我们</a>
                </li>
            </ul>
        </div>
    </div>

    <footer-nav-component index="ucenterHome"/>
</template>
<style>
    /*用户账户*/
    /*所有订单*/
    .enterpriseHome .allOrders , .enterpriseHome .pendingNumber , .enterpriseHome .repairNumber{color: #ff8317 !important;}
    /*操作图标*/
    .enterpriseHome .orderindex{padding-right: 10% !important; padding-left: 10% !important;}
    .enterpriseHome .orderindex div{text-align: center;}
    .enterpriseHome .orderindex .pendingBtn{border-right: 1px solid #dcdbe1;}
    .enterpriseHome .orderindex div>a{width:100%; color:#A8A8A8; font-size: 0.28rem; display: inline-block; vertical-align: middle;}
    .enterpriseHome .orderindex div>a>p{display: inline-block; vertical-align: middle; margin-left: 0.1rem;}
    .enterpriseHome .orderindex div>a>i{vertical-align: middle; position: relative;}
    .enterpriseHome .orderindex div>a>i{vertical-align: middle; position: relative;}
    .enterpriseHome .orderindex div>a>i .mui-badge{background-color: #f45a58;}
    .enterpriseHome .orderindex div>a>p>span{color: inherit; height: 100%; font-size: 0.28rem; vertical-align: middle;}
    .enterpriseHome .orderindex .pendingNumber{color: inherit; height: 100%; font-size: 0.28rem; vertical-align: middle;}

</style>
<script type="text/ecmascript-6">
		import '../../fonts/mui.css';
		import footerNavComponent from '../../components/footer-nav/footer-nav.vue';
        import Page from '../../base/Page'
        import { API } from '../../config/constants'
        export default new Page({
            vuex:{
                getters:{
                    profile:function(state){
                        return state.profile;
                    }
                }
            },
            data(){
                return{
                    result:{}
                }
            },
            ready () {
                this.getJSON(API.GET_ORDER_COUNT, {}, res => {
                    this.result = res.resultData
                });
                /*上拉下拉*/
                mui('.mui-scroll-wrapper').scroll({
                    indicators: true, //是否显示滚动条
                    deceleration : 0.0005,
                });
            },
            components:{
                footerNavComponent
            }
    });

</script>